package 比赛.chuanZhiMoNi;

import java.util.Scanner;

public class H {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] value = new int[N+1];
        int maxOld = 0;
        int index = -1;
        int min = Integer.MAX_VALUE;

        int temp;
        for(int i = 1 ;i<N+1;i++){
            int disous =  L +i-1;
            value[i] = disous;

            temp = disous>0?disous:-1*disous;

            if(temp<min){
                min = temp;
                index = i;
            }

            maxOld += disous;
        }

        int can = -1*value[index];
        int res = maxOld + can;
        System.out.println(res);

    }

}
